<template>
  <views class="invoice_look">
    <viewTitle :title="'开票信息'" :border="false"></viewTitle>
    <div class="invoice_infor">    
           <table>
                <tbody>
                       <tr>
                           <td><span class="title">发票抬头：</span>{{data.enterprise_name}}</td>
                           <td><span class="title">开户银行：</span>{{data.bank_name}}</td>
                       <tr>
                           <td><span class="title">发票金额：</span>{{data.money}}</td>
                           <td><span class="title">开户账号：</span>{{data.bank_sn}}</td>
                       </tr>
                       <tr>
                           <td><span class="title">收货地址：</span>{{data.receiver_address}}</td>
                           <td><span class="title">税务登记证号：</span>{{data.enterprise_code}}</td>
                       </tr>
                       <tr>
                           <td><span class="title">收货电话：</span>{{data.receiver_mobile}}</td>
                           <td><span class="title">开票税目：</span>{{data.invoice_category_name}}</td>
                       </tr>
                       <tr>
                           <td><span class="title">收货人：</span>{{data.receiver_name}}</td>
                           <td></td>
                       </tr>
                </tbody>
           </table>                 
    </div>
  </views>
</template>
<script>
export default {
  data() {
    return {
        data:{}
    };
  },
  methods: {
      getData(){
          if(this.$store.state.terrace==1){
              this.getEnterpriseData();
          }
          if(this.$store.state.terrace==3){
              this.getFacilitatorData();
          }
      },
      getEnterpriseData(){
          let {code , msg, data} = this.$api.sendSync(this.$mapapi.egetInvoiceDetail, {
              enterprise_invoice_id:this.$route.query.enterprise_invoice_id||0
          });
          if(code != 200&&code!=501){
              this.$message.error(msg);
              return;
          }
          this.data= data;
      },
      getFacilitatorData(){
          let {code , msg, data} = this.$api.sendSync(this.$mapapi.finvoiceDetail, {
              enterprise_invoice_id:this.$route.query.enterprise_invoice_id||0
          });
          if(code != 200&&code!=501){
              this.$message.error(msg);
              return;
          }
          this.data= data;
      }
  },
  mounted() {
     this.$setRouteTitle();
     this.getData()
  },
  created() {}
};
</script>


<style lang="less"  :scope="true"  src="@/style/invoice/invoice_look.less" >
</style>
